<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//1.当前时间
			var date1 = new Date()
			console.log(date1)
			//2.指定时间
			var date2 = new Date("2018/08/01 19:38:14")
			console.log(date2)
		</script>
	</body>
</html>
